import java.util.Scanner;//相当于头文件

public class Test {
    public static void main(String[] args) {
        int n = 1;
        int sum = 0;
        while (n <= 5) {
            int i = 1;
            int ret = 1;
            while (i <= n) {
                ret *= i;
                i++;
            }//n的阶乘
            sum += ret;
            n++;
        }//n的阶乘之和
        System.out.println(sum);
 /*       int a = 1;
        int sum = 0;
        while (a <= 10) {
            sum += a;
            a++;
        }
        System.out.println(sum);*///打印1-10的和

       /* int a = 1;
        while (a <= 10) {
            System.out.println(a);
            a++;
        }*///打印1-10的数字

      /*  int a = 1;
        while (a <= 10) {
            System.out.println(a);
        }//死循环*/
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int year = scanner.nextInt();
        if(year % 4 ==0 && year % 100 != 0 || year % 400 == 0){
            System.out.println(year + " is LeapYear");
        }else{
            System.out.println(year + " is not LeapYear");
        }
    }//判断是不是闰年

    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);//System.in代表从键盘输入
        int num = scan.nextInt();//输入一个整数
        if(num % 2 == 0) {
            System.out.println(num + "是偶数");
        } else {
            System.out.println(num + "是奇数");
        }
    }
    public static void main2(String[] args) {
        String str = "abc";
        switch (str) {
            case "abc":
                System.out.println("abc");
                break;
            case "123":
                System.out.println("123");
                break;
            default:
                System.out.println("error");
                break;
        }
    }
    //不能作为switch参数的数据类型是什么？ float double boolean long
    public static void main1(String[] args) {
        int a = 10;
        switch (a) {
            case 1:
                System.out.println(1);
                break;
            case 2:
                System.out.println(2);
                break;
            case 3:
                System.out.println(3);
                break;
            default:
                System.out.println("fault");
                break;
        }
    }
}
